/** @format */

.color-picker {
  position: relative;
  display: inline-block;

  .trigger-wrap,
  .panel-wrap {
    box-sizing: border-box;
    padding: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  .trigger-wrap {
    width: 50px;
    height: 50px;

    .trigger {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      cursor: pointer;
    }
  }

  .panel-wrap {
    position: absolute;
    top: 100%;
    width: 330px;

    .panel-top {
      display: flex;
      flex: 1;
      justify-content: space-between;
    }

    .panel-bot {
      display: flex;
      justify-content: space-between;
      margin-top: 5px;

      .input,
      .btn {
        transition: 0.3s;
      }

      .input,
      .btn:last-child {
        box-sizing: border-box;
        height: 30px;
        border: 1px solid #ddd;
        border-radius: 4px;
      }

      .input {
        padding: 0 10px;

        &:focus,
        &:focus-visible {
          border-color: var(--primary-border-color);
          outline: 0;
          box-shadow: 0 0 5px 0 var(--primary-box-shadow-color);
        }
      }

      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
        cursor: pointer;

        &:first-child {
          color: var(--primary-color);
        }

        &:last-child {
          padding: 0 10px;

          &:hover {
            color: #fff;
            background: var(--primary-color);
            border-color: var(--primary-color);
          }
        }
      }
    }
  }
}

.panel-enter-active,
.panel-leave-active {
  transition: opacity 0.3s ease;
}

.panel-enter-from,
.panel-leave-to {
  opacity: 0;
}
